In interactive applications such as multiplayer games, many activities associated with the interactive application can be taking place simultaneously. For example, in interactive applications implemented across a distributed computing system (e.g. a client-server architecture), client devices may need to periodically connect with a server to perform various actions and obtain updates to the status of the interactive application. For instance, in the context of a location-based parallel reality game, game modules running on client devices used by players to play the game may need to make remote procedure calls (RPCs) to invoke certain program elements, methods, and/or services (i.e. execute RPC methods) on a game server to return results to the game module.
For certain client-server RPC methods, it can be desirable to implement cross-cutting actions at the server that cut across multiple different RPC methods, regardless of the actual intent or content of the call. For example, in a location-based parallel reality game where player movement in the parallel virtual world is based on player position in the real world, any time the client contacts the game server, the game server should record the location of the client. For certain of these cross-cutting concerns, the client must always provide certain information to the server to enable the action. For instance, the client must provide its location. For other actions, no additional information is required. For example, the server can record the time at which the client last connected, which requires no additional information from the client.
Due to the large volume of RPC methods that need to be executed in an interactive application, it can become impractical and error-prone to explicitly add cross-cutting actions to the implementation of every new RPC method. In addition, as new cross-cutting actions are added, it can be impractical and error prone to scan the code base for all existing RPC methods and to add the new cross-cutting actions to every existing RPC method.